updating oE calc_hash

Routines

calc_hash

include map.e 
namespace map 
public function calc_hash(object key_p, integer max_hash_p) 

calculates a Hashing value from the supplied data.

Parameters:
  1. key_p : The data for which you want a hash value calculated.
  2. max_hash_p : The returned value will be no larger than this value.
Returns:

An integer, the value of which depends only on the supplied data.

Comments:

This is used whenever you need a single number to represent the data you supply. It can calculate the number based on all the data you give it, which can be an atom or sequence of any value.

Example 1:
integer h1 
-- calculate a hash value and ensure it will be a value from 1 to 4097. 
h1 = calc_hash( symbol_name, 4097 ) 
Not Categorized, Please Help

Search



Quick Links

User menu

Not signed in.

Misc Menu